import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// import requireTransform from 'vite-plugin-require-transform';
import { esbuildCommonjs } from '@originjs/vite-plugin-commonjs'


// https://vitejs.dev/config/
export default defineConfig({
  // build: {
  //   commonjsOptions: {
  //     transformMixedEsModules: true,
  //   },
  // },
  optimizeDeps:{
    esbuildOptions:{
      plugins:[
        esbuildCommonjs(['vod-js-sdk-v6']) 
      ]
    }
  },
  
  plugins: [
    vue(),
    // requireTransform({
    //   fileRegex: /.js$|.vue$/
    // }),
  ],
})
